import 'package:mahjong/entity/UserTask.dart';

T asT<T>(dynamic value) {
  if (value is T) {
    return value;
  }
  return null;
}

class LicensingCard {
  int licensingCard;
  UserTask userTask;
  LicensingCard({this.licensingCard, this.userTask});
  factory LicensingCard.formJSON(Map<String, dynamic> json) {
    if (json == null) {
      return null;
    }
    return LicensingCard(
        licensingCard: asT<int>(json["licensingCard"]),
        userTask: UserTask.fromJson(json["userTask"]));
  }
}
